home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Code Resources / 3D Buttons CDEF 1.0b4 / Source / 3D Buttons CDEF source / (3D Buttons CDEF.π) / LGBCheckbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-04  |  1.3 KB  |  40 lines  |  [TEXT/MMCC]

  1. /**************************************************************************
  2.     LGBCheckbox
  3.     
  4.     Public domain, by Zig Zichterman.
  5.     
  6.     This class implements 3D checkboxes according to the guidelines
  7.     suggested in _develop_ 15. Some of the drawing code is taken from
  8.     the public domain source accompanying _develop_ 15.
  9. **************************************************************************/
  10. #pragma once
  11.  
  12. class LGBCheckbox {
  13.     public :
  14.         static long    Main(short inVariation, ControlHandle ioControl,
  15.                 short inMsg, long ioParam);
  16.  
  17.     // ———— constructor —————————————————————————————————————————————
  18.     protected :
  19.         LGBCheckbox(ControlRecord *inControl, Boolean inUseWFont);
  20.         ControlRecord    *mControl;
  21.         Boolean            mUseWFont;
  22.         
  23.     // ———— dispatch —————————————————————————————————————————————————
  24.     protected :
  25.         void    Draw(long inPartCode);
  26.         Boolean    Test(Point inHitPt);
  27.         void    CalcCRgn(RgnHandle ioRgn);
  28.         
  29.     // ———— Draw —————————————————————————————————————————————————————
  30.     protected :
  31.         void    DrawBW(void);
  32.         void    DrawColor(void);
  33.         void    DrawColorActive(void);
  34.         void    DrawColorInactive(void);
  35.         void    CalcBoxes(Rect &outCheckbox, Rect &titleBox);
  36.         void    DrawCheckbox(const Rect &inCheckbox, Boolean inColor = false);
  37.         void    DrawTitle(const Rect &inTitlebox, Boolean inDim1Bit = false);
  38. };
  39.  
  40.